<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Core Plot (iOS): CPTImage Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="core-plot-logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Core Plot (iOS)
   
   </div>
   <div id="projectbrief">Cocoa plotting framework for Mac OS X and iOS</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript" src="dynsections.js"></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Animation&#160;&&#160;Constants</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('interface_c_p_t_image.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#properties">Properties</a>  </div>
  <div class="headertitle">
<div class="title">CPTImage Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="CPTImage" --><!-- doxytag: inherits="NSObject,NSCoding-p-p,NSCopying-p-p" -->
<p>An immutable image.  
 <a href="interface_c_p_t_image.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for CPTImage:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="interface_c_p_t_image__inherit__graph.png" border="0" usemap="#_c_p_t_image_inherit__map" alt="Inheritance graph"/></div>
<map name="_c_p_t_image_inherit__map" id="_c_p_t_image_inherit__map">
<area shape="rect" id="node2" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" title="NSObject" alt="" coords="24,86,104,117"/><area shape="rect" id="node4" href="http://developer.apple.com/iPhone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="5,6,123,37"/><area shape="rect" id="node6" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html" title="\&lt;NSCoding&#45;p\&gt;" alt="" coords="128,86,249,117"/><area shape="rect" id="node8" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html" title="\&lt;NSCopying&#45;p\&gt;" alt="" coords="274,86,403,117"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for CPTImage:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="interface_c_p_t_image__coll__graph.png" border="0" usemap="#_c_p_t_image_coll__map" alt="Collaboration graph"/></div>
<map name="_c_p_t_image_coll__map" id="_c_p_t_image_coll__map">
<area shape="rect" id="node2" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" title="NSObject" alt="" coords="24,86,104,117"/><area shape="rect" id="node4" href="http://developer.apple.com/iPhone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="5,6,123,37"/><area shape="rect" id="node6" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html" title="\&lt;NSCoding&#45;p\&gt;" alt="" coords="128,86,249,117"/><area shape="rect" id="node8" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html" title="\&lt;NSCopying&#45;p\&gt;" alt="" coords="274,86,403,117"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="class_c_p_t_image-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Public Class Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Factory Methods</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_image.html#a69a63ea3a3bec2284a5c60c426d7fbcc">imageWithCGImage:scale:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>.  <a href="#a69a63ea3a3bec2284a5c60c426d7fbcc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_image.html#a0f5aea573694f892d6323ef0865855a7">imageWithCGImage:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a> and scale 1.0.  <a href="#a0f5aea573694f892d6323ef0865855a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_c_p_t_image.html#a2456200e77db5c651696fbb8be097492">imageForPNGFile:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the contents of a PNG file.  <a href="#a2456200e77db5c651696fbb8be097492"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Instance Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Initialization</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_image.html#a1a3f7e09b1b0c7c5a3d3c46fca9e02ea">initWithCGImage:scale:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>.  <a href="#a1a3f7e09b1b0c7c5a3d3c46fca9e02ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_image.html#a42f9e2cc9877c3b672c6706dc9157962">initWithCGImage:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a> and scale 1.0.  <a href="#a42f9e2cc9877c3b672c6706dc9157962"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_image.html#a9ffebde730aa2e5ef5cb3dadf549e38c">initForPNGFile:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the contents of a PNG file.  <a href="#a9ffebde730aa2e5ef5cb3dadf549e38c"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Drawing</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_c_p_t_image.html#aab29f34450ad6c1f232e54f31c1d6517">drawInRect:inContext:</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws the image into the given graphics context.  <a href="#aab29f34450ad6c1f232e54f31c1d6517"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="properties"></a>
Properties</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef3e7d639bcd9b66153b2e29269de8ec"></a><!-- doxytag: member="CPTImage::image" ref="aef3e7d639bcd9b66153b2e29269de8ec" args="" -->
<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_image.html#aef3e7d639bcd9b66153b2e29269de8ec">image</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a> to wrap around. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23c96cab6dad05c21bf5476c5b39920e"></a><!-- doxytag: member="CPTImage::scale" ref="a23c96cab6dad05c21bf5476c5b39920e" args="" -->
CGFloat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_image.html#a23c96cab6dad05c21bf5476c5b39920e">scale</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The image scale. Must be greater than zero. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_image.html#a181f660a50ca3488f89531cd9fefe487">tiled</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw as a tiled image?  <a href="#a181f660a50ca3488f89531cd9fefe487"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_c_p_t_image.html#acdec03c0e81a97e3b326c852840682e4">tileAnchoredToContext</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Anchor the tiled image to the context origin?  <a href="#acdec03c0e81a97e3b326c852840682e4"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An immutable image. </p>
<p>An immutable object wrapper class around <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </p>
</div><hr/><h2>Method Documentation</h2>
<a class="anchor" id="aab29f34450ad6c1f232e54f31c1d6517"></a><!-- doxytag: member="CPTImage::drawInRect:inContext:" ref="aab29f34450ad6c1f232e54f31c1d6517" args="(CGRect rect,[inContext] CGContextRef context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) drawInRect: </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iPhone/library/documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html#//apple_ref/doc/c_ref/CGRect.html">CGRect</a>)&#160;</td>
          <td class="paramname"><em>rect</em></td>
        </tr>
        <tr>
          <td class="paramkey">inContext:</td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGContextRef.html">CGContextRef</a>)&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draws the image into the given graphics context. </p>
<p>If the tiled property is TRUE, the image is repeatedly drawn to fill the clipping region, otherwise the image is scaled to fit in rect.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>The rectangle to draw into. </td></tr>
    <tr><td class="paramname">context</td><td>The graphics context to draw into. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2456200e77db5c651696fbb8be097492"></a><!-- doxytag: member="CPTImage::imageForPNGFile:" ref="a2456200e77db5c651696fbb8be097492" args="(NSString *path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *) <a class="el" href="interface_c_p_t_image.html#a2456200e77db5c651696fbb8be097492">imageForPNGFile:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>path</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the contents of a PNG file. </p>
<p>On systems that support hi-dpi or "Retina" displays, this method will look for a double-resolution image with the given name followed by "@2x". If the "@2x" image is not available, the named image file will be loaded.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>The file system path of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the contents of the PNG file. </dd></dl>

</div>
</div>
<a class="anchor" id="a0f5aea573694f892d6323ef0865855a7"></a><!-- doxytag: member="CPTImage::imageWithCGImage:" ref="a0f5aea573694f892d6323ef0865855a7" args="(CGImageRef anImage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *) <a class="el" href="interface_c_p_t_image.html#a0f5aea573694f892d6323ef0865855a7">imageWithCGImage:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>)&#160;</td>
          <td class="paramname"><em>anImage</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a> and scale 1.0. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">anImage</td><td>The image to wrap. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a69a63ea3a3bec2284a5c60c426d7fbcc"></a><!-- doxytag: member="CPTImage::imageWithCGImage:scale:" ref="a69a63ea3a3bec2284a5c60c426d7fbcc" args="(CGImageRef anImage,[scale] CGFloat newScale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_c_p_t_image.html">CPTImage</a> *) <a class="el" href="interface_c_p_t_image.html#a0f5aea573694f892d6323ef0865855a7">imageWithCGImage:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>)&#160;</td>
          <td class="paramname"><em>anImage</em></td>
        </tr>
        <tr>
          <td class="paramkey">scale:</td>
          <td></td>
          <td class="paramtype">(CGFloat)&#160;</td>
          <td class="paramname"><em>newScale</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns a new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">anImage</td><td>The image to wrap. </td></tr>
    <tr><td class="paramname">newScale</td><td>The image scale. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a9ffebde730aa2e5ef5cb3dadf549e38c"></a><!-- doxytag: member="CPTImage::initForPNGFile:" ref="a9ffebde730aa2e5ef5cb3dadf549e38c" args="(NSString *path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) <a class="el" href="interface_c_p_t_image.html#a9ffebde730aa2e5ef5cb3dadf549e38c">initForPNGFile:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html">NSString</a> *)&#160;</td>
          <td class="paramname"><em>path</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the contents of a PNG file. </p>
<p>On systems that support hi-dpi or "Retina" displays, this method will look for a double-resolution image with the given name followed by "@2x". If the "@2x" image is not available, the named image file will be loaded.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>The file system path of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the contents of the PNG file. </dd></dl>

</div>
</div>
<a class="anchor" id="a42f9e2cc9877c3b672c6706dc9157962"></a><!-- doxytag: member="CPTImage::initWithCGImage:" ref="a42f9e2cc9877c3b672c6706dc9157962" args="(CGImageRef anImage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) <a class="el" href="interface_c_p_t_image.html#a42f9e2cc9877c3b672c6706dc9157962">initWithCGImage:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>)&#160;</td>
          <td class="paramname"><em>anImage</em></td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a> and scale 1.0. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">anImage</td><td>The image to wrap. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a1a3f7e09b1b0c7c5a3d3c46fca9e02ea"></a><!-- doxytag: member="CPTImage::initWithCGImage:scale:" ref="a1a3f7e09b1b0c7c5a3d3c46fca9e02ea" args="(CGImageRef anImage,[scale] CGFloat newScale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html">id</a>) <a class="el" href="interface_c_p_t_image.html#a42f9e2cc9877c3b672c6706dc9157962">initWithCGImage:</a> </td>
          <td></td>
          <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>)&#160;</td>
          <td class="paramname"><em>anImage</em></td>
        </tr>
        <tr>
          <td class="paramkey">scale:</td>
          <td></td>
          <td class="paramtype">(CGFloat)&#160;</td>
          <td class="paramname"><em>newScale</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes a <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </p>
<p>This is the designated initializer.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">anImage</td><td>The image to wrap. </td></tr>
    <tr><td class="paramname">newScale</td><td>The image scale. Must be greater than zero. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="interface_c_p_t_image.html" title="An immutable image.">CPTImage</a> instance initialized with the provided <a class="elRef" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGImageRef.html">CGImageRef</a>. </dd></dl>

</div>
</div>
<hr/><h2>Property Documentation</h2>
<a class="anchor" id="acdec03c0e81a97e3b326c852840682e4"></a><!-- doxytag: member="CPTImage::tileAnchoredToContext" ref="acdec03c0e81a97e3b326c852840682e4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- CPTImage:<code> [read, write, assign]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Anchor the tiled image to the context origin? </p>
<p>If YES, the origin of the tiled image is anchored to the origin of the drawing context. If NO, the origin of the tiled image is set to the orgin of rectangle passed to <code>drawInRect:inContext:</code>. The default value is YES. If <code>tiled</code> is NO, this property has no effect. </p>

</div>
</div>
<a class="anchor" id="a181f660a50ca3488f89531cd9fefe487"></a><!-- doxytag: member="CPTImage::tiled" ref="a181f660a50ca3488f89531cd9fefe487" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- CPTImage:<code> [read, write, assign]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draw as a tiled image? </p>
<p>If YES, the image is drawn repeatedly to fill the current clip region. Otherwise, the image is drawn one time only in the provided rectangle. The default value is NO. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>Source/<a class="el" href="_c_p_t_image_8h_source.html">CPTImage.h</a></li>
<li>Source/CPTImage.m</li>
</ul>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="interface_c_p_t_image.html">CPTImage</a>      </li>

    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a></li>
   </ul>
 </div>


</body>
</html>
